package com.gxa.saas.service.impl;

import com.gxa.saas.mapper.SaleGoodsMapper;
import com.gxa.saas.pojo.SaleGoods;
import com.gxa.saas.pojo.SaleStores;
import com.gxa.saas.service.SaleGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional(rollbackFor = {Throwable.class})
public class SaleGoodsServiceImpl implements SaleGoodsService {

    @Autowired
    SaleGoodsMapper saleGoodsMapper;
    @Override
    public List<SaleGoods> selectAll() {
        return saleGoodsMapper.selectAll();
    }

    @Override
    public List<SaleGoods> selectByPage(Integer page, Integer size) {
        return  saleGoodsMapper.selectByPage(size*(page-1),size);
    }

    @Override
    public List<SaleGoods> selectByTime(String time) {
        return saleGoodsMapper.selectByTime(time);
    }
}
